from torch.utils.data import Dataset

class MovieDataset(Dataset):
    def __init__(self, data: list):
        super(MovieDataset, self).__init__()
        self.data = data

    def __len__(self) -> int:
        return len(self.data)
    
    def __getitem__(self, idx: int) -> tuple:
        x, y = self.data[idx]
        return x, y
